package com.iweb.pojo;

import lombok.Data;

import java.sql.Timestamp;
import java.util.List;

@Data
public class Commodity {

    private String id;
    private String name;
    private String title;
    private Double price;
    private String categoryId;
    private String state;
    private Long commentCount;
    private Timestamp createTime;
    private String type; // 自营 self 其他 normal

    // 关联图片
    private CommodityPic commodityPic; // active

    private List<CommodityPic> commodityPics; // push

    public Commodity set(String id, String name, String title, Double price, String categoryId,
                         String state, Long commentCount, Timestamp createTime) {
        this.id = id;
        this.name = name;
        this.title = title;
        this.price = price;
        this.categoryId = categoryId;
        this.state = state;
        this.commentCount = commentCount;
        this.createTime = createTime;
        return this;
    }
}
